package com.zyuc.spark.service.example

import com.zyuc.spark.service.SparkServerTrait
import org.apache.hadoop.fs.FileSystem
import org.apache.spark.sql.SparkSession

/**
  * Created by zhoucw on 18-8-9 下午4:51.
  */
object AccessLogServerExample {
  def main(args: Array[String]): Unit = {

    val spark = SparkSession.builder().appName("test").master("local[3]").getOrCreate()
    val fileSystem = FileSystem.get(spark.sparkContext.hadoopConfiguration)

    // create an object of AccessLogServerExample which implemented trait SparkServerTrait
    val sparkServer:SparkServerTrait = AccessLogServer

    sparkServer.handleServer("8899", spark, fileSystem)
  }
}
